function kset(key,value) 
{ 
    window.localStorage.setItem( key , value ); 
}
function kget( key ) 
{ 
    return window.localStorage.getItem( key ); 
}
function kremove( key ) 
{
    window.localStorage.removeItem( key ); 
}

function alert(content,type){
	if(!type) type = "warning";
	var msg = $.messager.show(content, {type:type,placement: 'top',close:false});
}

function select(id,arr){

	for (var i = arr.length - 1; i >= 0; i--) {

		if(id == arr[i]['id']){
			return arr[i];break;
		}
	};
	return arr[0];
}